\section{sin --- Sine}
\label{fn:sin}
\index{sin()}
\index{sine}
\begin{rail}
Sine : 'sin' '(' ( Scalar | Matrix ) ')' ;
\end{rail}

\verb+sin+ calculates the sine of the argument, which must be specified
in radians.  If the argument is a matrix, then the \verb+sin+ operation
is performed on each element of the matrix in turn.  If the argument is
complex, given by $z$, then the result is:

\[ \sin(\Re(z)) \cosh(\Im(z)) +j \cos(\Re(z)) \sinh(\Im(z)) \]


\paragraph{Example}
\index{example of sin()}
\index{sin()!example}
\begin{verbatim}
> sin(0)
        0
> sin(pi/4)
    0.707
> sin(-pi/2)
       -1
> a = rand(2,5)*pi
 a =
    0.641       2.06       2.86      0.939        2.2
    0.526      0.405      0.351      0.834       2.99
> sin(a)
    0.598      0.884      0.279      0.807      0.809
    0.502      0.394      0.344      0.741      0.156 
\end{verbatim}

See also: Page~\pageref{fn:asin} \verb+asin()+,
Page~\pageref{fn:cos} \verb+cos()+,
Page~\pageref{fn:sinh} \verb+sinh()+,
Page~\pageref{fn:tan} \verb+tan()+.

\newpage


